package cn.zxl.spring.holiday.job.domain;

import cn.zxl.spring.holiday.job.util.EmployeeConverter;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 *
 * </p>
 *
 * @author bofeifei
 * @since 2021-10-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Employee对象", description = "")
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty("编号")
    // AUTO 数据库id自增
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ExcelProperty("用户名")
    private String username;

    @ExcelProperty("姓名")
    private String name;

    @ExcelIgnore
    private String password;

    @ExcelProperty("邮箱")
    private String email;

    @ExcelProperty("年龄")
    private Integer age;

    @ExcelIgnore
    private Boolean admin;

    @ExcelIgnore
    private Long deptId;

    @ExcelIgnore
    private String slat;

    @ExcelProperty(value = "部门名称",converter = EmployeeConverter.class)
    @TableField(select = false, exist = false)
    private Department dept;

}
